package com.zd.service.lmpl;/**
 * @Description: FinancezdServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-29
 * @Version:v1.0
 */

import com.zd.mapper.FinancezdMapper;
import com.zd.service.lnter.FinancezdServicelnter;
import com.zzg.entity.Finance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description: FinancezdServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-29
 * @Version:v1.0
 */
@Service
public class FinancezdServicelmpl implements FinancezdServicelnter {
    @Autowired
    private FinancezdMapper financezdMapper;

    /**
     * 根据运单编号查询财务核销信息
     *
     * @param waybill 运单id
     * @return Finance 财务管理
     */
    @Override
    public Finance getFinanceByfinance(String waybill) {
        return financezdMapper.getFinanceByfinance (waybill);
    }

    /**
     * 根据财务id修改财务状态
     *
     * @param costbreakdownid 财务id
     * @param orderstatus     财务状态
     * @return 返回数值判断是否修改成功
     */
    @Override
    public int updateFinancestate(String costbreakdownid, String orderstatus) {
        return financezdMapper.updateFinancestate (costbreakdownid,orderstatus);
    }

    /**
     * 根据财务id修改财务核销状态
     *
     * @param costbreakdownid 财务id
     * @param verification    是否核销
     * @return 返回数值判断是否修改成功
     */
    @Override
    public int updateFinanceverification(String costbreakdownid, String verification) {
        return financezdMapper.updateFinanceverification (costbreakdownid,verification);
    }
}

